put the value of (card field f2 / card field f1) into card field f6
put the value of card field f3 into loop
repeat (loop) times
put the random of card field f1 into it
if it <= (card field f2) then
add 1 to card field f4
end if
end repeat
put the value of (card field f4 / card field f3) * 100 into card field f5
show card field coverone
hide card field covertwo
end mouseUp
-- part 8 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=379 top=223 right=245 bottom=446
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: REPLACE
----- HyperTalk script -----
on mouseUp
show card field covertwo
global popno
add 1 to popno
put the value of (card field f5) into card field f6
put the value of (card field f1 *( card field f6 / 100)) into card field f2
put 0 into card field f4
put the value of popno into card field effno
end mouseUp
-- part 9 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=268 top=159 right=181 bottom=366
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: f6
-- part 10 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=205 top=315 right=337 bottom=256
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: NEXT
----- HyperTalk script -----
on mouseUp
go to next card
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: 8003
-- rect: left=149 top=314 right=337 bottom=199
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: PREV.
----- HyperTalk script -----
on mouseUp
go back
end mouseUp
-- part 12 (field)
-- low flags: 00
-- high flags: 0002
-- rect: left=410 top=69 right=92 bottom=496
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 128
-- text size: 10
-- style flags: 0
-- line height: 13
-- part name: EFFNO
-- part 13 (field)
-- low flags: 00
-- high flags: 0001
-- rect: left=277 top=308 right=321 bottom=350
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: COVERONE
-- part 14 (field)
-- low flags: 00
-- high flags: 0001
-- rect: left=277 top=322 right=335 bottom=350
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: COVERTWO
-- part contents for background part 1
----- text -----
GENETIC DRIFT
-- part contents for background part 2
----- text -----
Hardy-Weinberg functions work best with large populations in which all the members mate among themselves to produce the next generation. However, if only a few members are involved in producing a new generation often dramatic shifts in gene frequencies can occur. For example, suppose two individuals were selected from a population (in which a particular gene was phenotypically displayed by 10 individuals) to start a new generation. The gene in question will be represented in the sample group of two with a frequency of either 100%, 50% or not at all. Thus its frequency in future generations will be greatly altered from that in the original population. In this exercise, you can take a population of any size, enter the number of individuals displaying a particular gene and the size of the mating group that will produce the next generation. By clicking on the RUN button you will randomly select the individuals in that mating group. At the completion of the run, clicking on the REPLACE button will build the next generation to the size of the original population with the frequency of the gene in question a function of its value in the mating group. Thus, the number of individuals displaying the specific gene (the bold number) will change. Click a second time on the RUN button to select a second sample to produce another generation. Some suggested figures are listed below for the original data input. Use them to see how gene flow varies as a function of population size and sample size.
Pop. Size Sample Size No. Indiv.
100 10 7
1000 10 7
10000 10 7
100 20 7
1000 20 7
10000 20 7
1000 100 7
1000 200 7
1000 300 7
1000 400 7
1000 600 7
1000 800 7
1000 1000 7
Generally, a trend should be established with these runs suggesting that gene frequency stability is a function of what? Record your data for each run and then flip to the next card where a graphing program will allow you to produce a visual display of the changing gene frequencies. Note that in some situations, the small mating group will fail to contain the gene in question. If this occurs, the frequency of the gene in the next generation will drop to 0 and you can terminate your run.